Add -N option to suppress smart icons.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 10 Feb 2004 13:51:24 +0000 (13:51 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 10 Feb 2004 13:51:24 +0000 (13:51 +0000)
gpsbabel/defs.h
gpsbabel/main.c
gpsbabel/mingw/Makefile
gpsbabel/mingw/mkwintesto.c
gpsbabel/util.c

index 5bd68dae487ce6c81b8abad0f6a4980c36956d39..807b2362c260796680db6ae93e61b88659bc647d 100644 (file)
@@ -67,6 +67,7 @@ typedef struct {
        int debug_level;
        gpsdata_type objective;
        int verbose_status;     /* set by GUI wrappers for status */
+       int no_smart_icons;     
 } global_options;
 
 extern global_options global_opts;
index 6c63cccc62a7522939f8ca62dc8a65778d191115..5d0490a3de987e7d5a7f63c19b31c016c55c1c20 100644 (file)
@@ -51,6 +51,7 @@ usage(const char *pname)
 "      -r              Process route information\n"
 "      -t              Process track information\n"
 "      -w              Process waypoint information [default]\n"
+"      -N              No smart icons on output\n"
 "      -x filtername   Invoke filter\n"
 "      -D level        Set debug level [%d]\n"
 "\n"
@@ -167,6 +168,9 @@ main(int argc, char *argv[])
                        case 'r':
                                global_opts.objective = rtedata;
                                break;
+                       case 'N':
+                               global_opts.no_smart_icons = 1;
+                               break;
                        case 'x':
                                optarg = argv[argn][2]
                                        ? argv[argn]+2 : argv[++argn];
index c3ad1a0f621406845e8e554954e375c371025986..03967bc59cdb55823a8f738ebe0181d8b6cfe262 100644 (file)
@@ -14,7 +14,7 @@ gpsbabel.exe: $(OBJS)
        cp gpsbabel.exe /tmp
 
 mkwintesto: mkwintesto.c
-       /usr/bin/cc mkwintesto.c ../util.c -o mkwintesto
+       /usr/bin/cc mkwintesto.c -o mkwintesto
 
 wintesto.cmd: mkwintesto
        ./mkwintesto ../testo
index be4997388e081bef8944c5d6a72d45d5d7d2e894..24bad24e26db92eccf69523af4c83376d7f75665 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <stdarg.h>
 
 #define        LINELENGTH      200
 #define        MYNAME          "MkWinTesto"
@@ -80,9 +81,20 @@ int f_outputLine (
        return 0;
 }
 
+/* ------------------------------------------------------------------------------------ */
+void
+fatal(const char *fmt, ...)
+{
+       va_list ap;
+       va_start(ap, fmt);
+       vfprintf(stderr, fmt, ap);
+       va_end(ap);
+       exit(1);
+}
+
 /* ------------------------------------------------------------------------------------ */
 int main(
-       int argc, 
+int argc, 
        char *argv[])
 {
        char    acLineIn[LINELENGTH];
index f4628e31617096c4362a7bb473ba8c3e247533ab..354ace1c3fcadc9110f13de3266496f5c06827c4 100644 (file)
@@ -453,6 +453,9 @@ get_tz_offset(void)
 const char *
 get_cache_icon(const waypoint *waypointp)
 {
+       if (global_opts.no_smart_icons)
+               return NULL;
+
        /*
         * For icons, type overwrites container.  So a multi-micro will 
         * get the icons for "multi".